<!DOCTYPE>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>流程管理</title>
    <link rel="stylesheet" href="/static/lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="/static/plugin/layer/skin/layer.css">
    <link rel="stylesheet" type="text/css" href="/static/css/dj-css.css">
    <style>
        .dj-select .dj-select-content .dj-select-input i{
            border-top-color:#35a3e5;
        }
        .dj-select{
            height:40px;
        }
        .main{
            padding:44px 0 33px 30px;
        }
        .main .layui-form-item label {
            height: 40px;
            line-height: 40px;
            font-size: 16px;
            width: auto;
            padding: 0;
            border:0;
            color:#333;
            background-color: transparent;
        }
        .main .layui-form-item textarea{
            height:150px;
            width:516px;
        }
        .operate{
            font-size:0;
            display: flex;
            justify-content:center;
        }
        .operate button{
            width:120px;
            height:40px;
            text-align: center;
            line-height: 40px;
            font-size:16px;
            border-radius: 2px;
        }
        .operate button.save{
            background-color:#4ad58b ;
            margin-left:220px;
            margin-right:18px;
            color:#fff;
            border:1px solid #4ad58b;
        }
        .operate button.back{
            background-color:transparent ;
            color:#666;
            border:1px solid #ddd;
        }
    </style>
</head>
<body>
<div id="createApp">
    <div class="main">
        <form class="layui-form layui-form-pane clearfix">
            <div class="layui-form-pane  time">
                <div class="layui-form-item">
                    <label class="layui-form-label">权限名：</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" placeholder="输入权限名称">
                    </div>
                </div>
            </div>
        </form>
        <div class="layui-form-item clearfix operate">
            <button class="save">保存</button>
            <button class="back">返回</button>
        </div>
    </div>
</div>
<script src="/static/lib/jquery.min.js"></script>
<script src="/static/lib/layui/layui.js" charset="utf-8"></script>
<script src="/static/lib/vue.min.js"></script>
<script src="/static/lib/x-layui.js"></script>
<script src="/static/lib/dj-js.js"></script>
<script type="text/javascript">


    var myid = "${department.id}";
    if (myid == "") {
        var kid = ""
    } else {
        kid = "$!{department.id}"
    }
    var VM = new Vue({
        el: "#createApp",
        created: function () {
            this.lay();
//            this.getDeptList();
        },
        data: {

            parameter: {
                "leave_type": "",
                "start_time": '',
                "end_time": "",
                "reason": ""
            }
        },
        methods: {
            lay: function () {
                layui.use(['layer', 'laydate'], function () {
                    var     layer = layui.layer,
                            laydate = layui.laydate;

                });
            },
            verify: function (item) {
                if (item == "") {
                    layer.msg("必填项不能为空！", {icon: 5});
                    return false;
                }
            },
            sub: function () {
                var _this = this;
                this.parameter.leave_type = $("#leave_type").html();
                this.parameter.start_time = $("#LAY_demorange_s").val();
                this.parameter.end_time = $("#LAY_demorange_e").val();
                this.parameter.reason = $("#reason").val();
                $.ajax({
                    type: "post",
                    url: "../../activiti/startleave.do",
                    data: _this.parameter,
                    dataType: "json",
                    success: function (data) {
                        layer.msg("提交成功！", {icon: 1});
//                        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
//                        parent.layer.close(index);
//                        parent.window.location.reload();
//                        window.location.href = "javascript:location.replace(location.href)";
                    }
                });
            },
            reset: function () {
                $("#leave_type").html("请选择请假类型");
                $("#leave_type").attr("selectedCode", "");
                $(".dj-select-list li").removeClass("selected");
                $("#LAY_demorange_s").val("");
                $("#LAY_demorange_e").val("");
                $("#reason").val("");
            },
            addFlow:function(){

            }
        }
    });//vue 实例结束


</script>
</body>
</html>